package main

import (
	"fmt"
)

func main() {

	var intChan chan int = make(chan int, 100)
	for i := 0; i < 100; i++ {
		intChan <- i
	}

	close(intChan)

	// 遍历,遍历前需要对管道进行关闭
	for v := range intChan {
		fmt.Println("value: ", v)
	}
}